<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="Tooplate">
    <link href="https://fonts.googleapis.com/css?family=Poppins:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i&display=swap"
          rel="stylesheet">

    <title>文物展览系统 - 管理员信息管理</title>

    <!-- Additional CSS Files -->
    <link rel="stylesheet" type="text/css" href="/assets/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/assets/css/font-awesome.css">
    <link rel="stylesheet" type="text/css" href="/assets/css/owl-carousel.css">
    <link rel="stylesheet" href="/assets/css/tooplate-artxibition.css">

    <style>
        .management-header {
            background-color: #f8f9fa;
            padding: 20px 0;
            margin-bottom: 30px;
        }
        .search-box {
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            margin-bottom: 30px;
        }
        .table-container {
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        .role-badge {
            font-size: 12px;
            padding: 4px 8px;
        }
    </style>
</head>

<body>
<!-- ***** Pre Header ***** -->
<div th:replace="Header"></div>

<!-- 管理页面头部 -->
<div class="management-header">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <h2>管理员信息管理</h2>
                <span>管理系统管理员账户和权限</span>
            </div>
        </div>
    </div>
</div>

<!-- 搜索和操作区域 -->
<div class="container">
    <div class="row">
        <div class="col-lg-12">
            <div class="search-box">
                <div class="row">
                    <div class="col-lg-3">
                        <input type="text" class="form-control" placeholder="管理员账号">
                    </div>
                    <div class="col-lg-3">
                        <select class="form-control">
                            <option>所有角色</option>
                            <option>超级管理员</option>
                            <option>内容管理员</option>
                            <option>用户管理员</option>
                        </select>
                    </div>
                    <div class="col-lg-3">
                        <select class="form-control">
                            <option>所有状态</option>
                            <option>正常</option>
                            <option>禁用</option>
                        </select>
                    </div>
                    <div class="col-lg-3">
                        <div class="btn-group btn-block">
                            <button class="main-dark-button">
                                <i class="fa fa-search"></i> 搜索
                            </button>
                            <button class="main-dark-button" data-toggle="modal" data-target="#addAdminModal">
                                <i class="fa fa-plus"></i> 添加
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 管理员列表 -->
    <div class="row">
        <div class="col-lg-12">
            <div class="table-container">
                <table class="table table-hover">
                    <thead class="thead-dark">
                    <tr>
                        <th>管理员ID</th>
                        <th>账号</th>
                        <th>姓名</th>
                        <th>角色</th>
                        <th>最后登录</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr th:each="admin : ${admins}">
                        <td th:text="${admin.id}">A001</td>
                        <td th:text="${admin.username}">admin</td>
                        <td th:text="${admin.realName}">系统管理员</td>
                        <td>
                                        <span class="badge role-badge"
                                              th:classappend="${admin.role == 'SUPER_ADMIN'} ? 'badge-danger' :
                                                             ${admin.role == 'CONTENT_ADMIN'} ? 'badge-primary' : 'badge-info'"
                                              th:text="${admin.roleName}">超级管理员</span>
                        </td>
                        <td th:text="${admin.lastLogin}">2024-01-20 14:30</td>
                        <td>
                            <span class="badge badge-success" th:if="${admin.status}">正常</span>
                            <span class="badge badge-danger" th:unless="${admin.status}">禁用</span>
                        </td>
                        <td>
                            <button class="